package com.tuanzi.loan.business.repository.family.custom;

import com.tuanzi.loan.business.entity.family.LoanChannelNdInfo;
import com.tuanzi.loan.business.entity.family.LoanLargeAmountPartnerControl;
import com.tuanzi.loan.vo.request.family.LoanLargeAmountPartnerControlSearchRequest;
import com.tuanzi.loan.vo.response.family.LoanLargeAmountPartnerControlSearchResponse;
import com.tuanzi.server.loan_base.model.db.LoanWholeSaleComment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
* @Description:    读取合作方配置后台数据库
* @Author:         xionghao
* @CreateDate:     2018/12/24
*/
public interface LoanLargeAmountPartnerControlRepositoryCustom {
    /**
     * 读取配置项
     * @param searchRequest
     * @param pageable
     * @return
     */
    Page<LoanLargeAmountPartnerControlSearchResponse> list(LoanLargeAmountPartnerControlSearchRequest searchRequest, Pageable pageable);

    /**
     * 判断配置项合作方来源
     * @param type
     * @return
     */
    LoanWholeSaleComment judgeCfrom(Integer type);

    /**
     * 根据id更新合作方配置信息
     * @param request
     */
    void updateById(LoanLargeAmountPartnerControlSearchRequest request);

    /**
     * 获取合作方甲方信息
     * @return
     */
    List<LoanWholeSaleComment> getPartnerInfo();

    /**
     * 查询所有的合作方配置信息
     * @return
     */
    List<LoanLargeAmountPartnerControl> findAll();

    /**
     * 查询所有的代理渠道
     * @return
     */
    List<LoanChannelNdInfo> findAllChannelN();
}
